package com.yeyks.dal.dao;

import com.yeyks.dal.domain.Message;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MessageMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Message record);

    Message selectByPrimaryKey(Integer id);

    List<Message> selectAll();

    int updateByPrimaryKey(Message record);

    int insertReturnId(Message record);

    List<Message> selectByUserTypePage(@Param("toUserId") Integer toUserId, @Param("toUserType") String toUserType,
                                       @Param("offset") Integer offset, @Param("maxrow") Integer maxrow);

    int selectByUserTypePageCount(@Param("toUserId") Integer toUserId, @Param("toUserType") String toUserType);

    List<Message> selectByPage(@Param("offset") Integer offset, @Param("maxrow") Integer maxrow);

    int selectByPageCount();
}